package com.jnu.mydiary.ui.welcome;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;

import com.bumptech.glide.Glide;
import com.jnu.mydiary.R;
import com.jnu.mydiary.databinding.FragmentHomeBinding;

public class HomeFragment extends Fragment {

    private HomeViewModel homeViewModel;
    private FragmentHomeBinding binding;

    public View onCreateView(@NonNull LayoutInflater inflater,
                             ViewGroup container, Bundle savedInstanceState) {
        homeViewModel =
                new ViewModelProvider(this).get(HomeViewModel.class);

        binding = FragmentHomeBinding.inflate(inflater, container, false);
        View root = binding.getRoot();

        ImageView Welcome=root.findViewById(R.id.imageView_welcome);
        Glide.with(HomeFragment.this.getContext()).load(R.drawable.welcome).into(Welcome);

        ImageView book=root.findViewById(R.id.imageView_book);
        Glide.with(HomeFragment.this.getContext()).load(R.drawable.hhhha).into(book);
       /* ImageView image1=root.findViewById(R.id.imageView_image1);
        Glide.with(HomeFragment.this.getContext()).load(R.drawable.yohu).into(image1);
        ImageView image2=root.findViewById(R.id.imageView_image2);
        Glide.with(HomeFragment.this.getContext()).load(R.drawable.quan).into(image2);*/
        return root;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        binding = null;
    }
}